Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

feat(harness): expose native Pi runtime - #3391

Merged
jonathanlab merged 1 commit into
mainfrom
pi-harness-runtime
Jul 20, 2026
Merged

feat(harness): expose native Pi runtime#3391
jonathanlab merged 1 commit into
mainfrom
pi-harness-runtime

Conversation

@jonathanlab

@jonathanlab jonathanlab commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

This cleans up the entry points towards the harness, which were getting quite muddled

It also introduces a way to spawn pi in RPC mode in @posthog/agent via rpc-host.ts, and a way to interact with the RPC host in a typed manner via rpc-client.ts

@trunk-io

trunk-io Bot commented Jul 13, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

jonathanlab commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 1e4cd6d.

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Security Review

The new runtime can reuse credentials from the initial agent directory when Pi recreates a runtime with a different directory. That can cross account or region boundaries in embedded runtime flows.

Reviews (1): Last reviewed commit: "feat(harness): expose native Pi runtime" | Re-trigger Greptile

Comment thread packages/harness/src/runtime.ts Outdated
Comment thread packages/harness/package.json
@jonathanlab
jonathanlab force-pushed the pi-harness-runtime branch 5 times, most recently from 1b1dd43 to a4f25c4 Compare July 13, 2026 13:35
@jonathanlab
jonathanlab force-pushed the pi-harness-runtime branch 2 times, most recently from 608c021 to cd593d5 Compare July 15, 2026 14:00
@jonathanlab
jonathanlab force-pushed the pi-harness-runtime branch 4 times, most recently from 0e925bf to 3c236f3 Compare July 17, 2026 10:01
Comment thread packages/agent/src/pi/rpc-client.ts Outdated
@veria-ai

veria-ai Bot commented Jul 17, 2026

Copy link
Copy Markdown

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Security review

No open security issues remain on this pull request.

Fixed/addressed: 2 · PR risk: 0/10

Comment thread packages/agent/src/pi/rpc-client.ts Outdated
Comment on lines +73 to +81
const child = spawn(
process.execPath,
[this.secureOptions.cliPath ?? "dist/cli.js", ...args],
{
cwd: this.secureOptions.cwd,
env: safePiEnvironment(process.env),
stdio: ["pipe", "pipe", "pipe", "pipe"],
},
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would we need ELECTRON_RUN_AS_NODE=1 here?

@tatoalo tatoalo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lfg

jonathanlab commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Jul 20, 10:49 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 20, 10:49 AM UTC: @jonathanlab merged this pull request with Graphite.

@jonathanlab
jonathanlab merged commit f418475 into main Jul 20, 2026
32 checks passed
@jonathanlab
jonathanlab deleted the pi-harness-runtime branch July 20, 2026 10:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants